<?php
/**
 * Created by PhpStorm.
 * User: sunfan
 * Date: 2017/8/16
 * Time: 10:12
 */

namespace App\Controller;


class AuthController extends ApiBaseController
{

    public function login(){
        $data = $this->data;
        $openID = $data['openID'];
        try{
            $token = $this->getToken($openID);
            $info = array('token'=>$token);
            $code = 1;
        }catch (\Exception $e){
            $msg = "系统错误";
        }
        $this->ApiReturn($code,$msg,$info);
    }
}